#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void count(int* arr, int sz)
{
	for (int i = 0; i < sz; i++)
	{
		int sum = 0;
		for (int j = 0; j < sz-1; j++)
		{
			if (arr[j] % 2 == 0)
			{
				sum = arr[j];
				arr[j] = arr[j + 1];
				arr[j + 1] = sum;
			}
		}

		
			
	}
}
int main()
{
	int arr[10] = { 0 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	for (int i = 0; i < sz; i++)
	{
		scanf("%d", &arr[i]);
	}
	count(arr, sz);
	for (int i = 0; i < sz; i++)
	{
		printf("%d ", *(arr +i));
	}
	return 0;
}
